# Replication package for table 4 and 5 in "A Model of Social Duties"

This replication package contains the code and data necessary to replicate the results in table 4 and 5 in "A Model of Social Duties". The structure of the package is as follows:

- `PreferenceModels.jl`: Contains the module for the preference models.
- `eval_models.jl`: Contains the code for the evaluation of the models.
- `choices_[...].csv`: The four different data files
- `snippets/`: Location where the snippets will be saved, will be created by `estim_models.jl` if not already present. 
- `temp_saves/`: Location for temporary saves of the estimated models as .json, will be created by `estim_models.jl` if not already present. 
- `saved_objects/`: Location for estimated models as julia objects, will be created by `estim_models.jl` if not already present. 
- `Project.toml`: The julia project file. 
- `Manifest.toml`: The julia manifest file, might be necessary to delete and recompile from the Project.toml if issues arise. 
- `Dockerfile`: The docker file for the container. 

The code was ran with julia 1.11.1. 


To simplify replication, a docker file is provided. See [https://docs.docker.com/get-started/](https://docs.docker.com/get-started/) for information on how to install docker.
Build the docker image with 

```docker build -t duties -f Dockerfile .```

and then you can run the container with 

`docker run -it --mount type=bind,source="$(pwd)",target=/workspace,consistency=cached duties /bin/bash`

To regenreate the relevant tables, run `julia --project=. eval_models.jl`
